package com.sz.demo.strategy;

import com.sz.demo.discount.DiscountStrategy;
import com.sz.demo.discount.NoDiscount;
import com.sz.demo.model.Fruit;
import com.sz.demo.promotion.NoPromotion;
import com.sz.demo.promotion.Promotion;
import java.math.BigDecimal;

/**
 * 常规定价策略（无折扣无促销）
 * @author Lenovo
 */
public class RegularPricingStrategy extends AbstractPricingStrategy {
    private static final DiscountStrategy NO_DISCOUNT = new NoDiscount();
    private static final Promotion NO_PROMOTION = new NoPromotion();

    @Override
    protected DiscountStrategy getDiscountStrategyFor(Fruit fruit) {
        return NO_DISCOUNT;
    }

    @Override
    protected BigDecimal applyPromotion(BigDecimal subtotal) {
        return NO_PROMOTION.apply(subtotal);
    }
}